﻿#region
/*******************************************************************************
** File Name:		    AdminGroupRepository.cs
** Creator:		        chao.jiang 
** EMail:               chao.jiang 
** Create date:	        
** Latest Modifier:
** Latest Modify date:
** Description:		    
** Modify History:
**
** Code Review:
**
** Version number:       1.0.0
*********************************************************************************/
#endregion
using System;
using System.Collections.Generic;
using Phoenix.Entity;
using Phoenix.Respository;
using IBatisNet.DataMapper;
using Phoenix.Data.IBatis;

namespace Phoenix.IBatisRepository
{
    public class AdminGroupRepository : BaseIBatisDao,IAdminGroup 
    {
    
		#region  Auto Generation

        public AdminGroupRepository()
            : base("/Config/IBatis/86TCMap.Config")
        {

        }
        		
        public void AddAdminGroup(EAdminGroup entity)
        {
			string stmtId = "AdminGroupMap.InsertAdminGroup";
			base.SqlMapper.Insert(stmtId, entity);
        }
        
		public  EAdminGroup GetByGroupID (System.Int32 groupID)
        {
			string stmtId = "AdminGroupMap.SelectByGroupID";
			return base.SqlMapper.QueryForObject<EAdminGroup>(stmtId, groupID);
        }
        
        public  void DeleteByGroupID (System.Int32 groupID)
        {
			string stmtId = "AdminGroupMap.DeleteByGroupID";
			base.SqlMapper.Update(stmtId, groupID);
        }
        
        public  void UpdateByGroupID (EAdminGroup entity)
        {
			string stmtId = "AdminGroupMap.UpdateByGroupID";
			base.SqlMapper.Update(stmtId, entity);
        }


		#endregion

        public IList<EAdminGroup> GetByOrgID(int orgID)
        {
            string stmtId = "AdminGroupMap.SelectByOrgID";
            return base.SqlMapper.QueryForList<EAdminGroup>(stmtId, orgID);
        }
    }
}

